package cn.zye.msa;

import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.widget.VideoView;

public class VideoViewEx extends VideoView {
	Context m_context;
	DisplayMetrics displayMetrics = new DisplayMetrics();
	public VideoViewEx(Context context) {
		super(context);
		m_context = context;
	}
	public VideoViewEx(Context context, AttributeSet attrs){
		super(context, attrs);
		m_context = context;
	}
	@Override
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		((Activity)m_context).getWindowManager().getDefaultDisplay().getMetrics(this.displayMetrics);
		this.displayMetrics = m_context.getResources().getDisplayMetrics();
		setMeasuredDimension(this.displayMetrics.widthPixels -1,
				this.displayMetrics.heightPixels - 1);
	}
}
